export const state = {
  userInfo: {},
  curProStatus: 'pdd',
    product:{
        product_id:0,
        product_name:"全部产品"
    }
};
export const mutations = {
  SET_USER_INFO: (state, userInfo) => {
    state.userInfo = userInfo;
  },
  SET_CUR_PRO_STATUS: (state, curProStatus) => {
    state.curProStatus = curProStatus;
    uni.setStorageSync("curProStatus", curProStatus);
  },
    product:(state,product)=>{
    state.product=product
  }
};
export const actions = {
  // 获取用户信息
  GetUserInfo({ commit, state }, needCatch) {},
};

export const getters = {
  userInfo: (state) => state.userInfo,
  isAdmin: (state) => state.userInfo.role == 1,
  curProStatus: (state) =>  state.curProStatus
};
